# -*-  coding:utf-8 -*- 
# Author : lihongliang

user_status = False
def login(func):
    def inner():
        username = "liang"
        password = "abc123"
        global  user_status

        if user_status == False:
            uname = input("请输入用户名：")
            pwd = input("请输入密码：")

            if  username == uname and pwd == password:
                print("用户登录成功 ")
                func()
                user_status = True
            else:
                print("用户或者密码错误！")
        elif  user_status ==True:
            print("用户已经登录")
            func()
    return inner

def  home():
    print("首页".center(50,"*"))
@login
def america():
    print("美国".center(50,"*"))


def japan():
    print("日本".center(50,"*"))

@login
def china():
    print("中国".center(50,"*"))


home()
america()
japan()
china()